<?php
class Communication_Form_Tpl extends Zen_Form
{
    public function init ()
    {

        parent::init();
        $this->setName('form');
        
        $alias = new Zend_Form_Element_Text('alias',
        array('required' => TRUE ,
          'label' => 'Template alias: ' , 
          'description'=>'use it in your code',
          'maxlength' => '300', 
          'class'=>'zend_text ',
          'validators' => array(array('StringLength' , true , array(0 , 300 , 'utf-8')))));
        $alias->setFilters ( array ('StringTrim','StripTags'));
        
        $header = new Zend_Form_Element_Text('header',
        array('required' => false ,
          'label' => 'Header: ' , 
          'maxlength' =>'300', 
          'class'=>'zend_text ',
          'validators' => array(array('StringLength' , true , array(0 , 300 , 'utf-8')))));
        $header->setFilters ( array ('StringTrim'));
		
        $text = new Zend_Form_Element_Textarea('text',
        array('required' => TRUE ,
           'label' => 'Template text: ' , 
           'description'=>'you can use any php code like <?=$this->user ?>',
           'class'=>'zend_text ',
          ));
        $text->setFilters ( array ('StringTrim'));
        
        $description = new Zend_Form_Element_Textarea('description',
        array('required' => false ,
           'label' => 'Description: ' , 
           'class'=>'zend_text ',
        	'rows'=>2
          ));
        $description->setFilters ( array ('StringTrim'));
		
        $this->addElements(array($alias,$header,$text,$description));
        
       
    }
}